package memento.fromCSDN.manyTimes;

import java.util.ArrayList;

/**
 * 负责人:象棋棋子备忘录管理类
 */
public class MementoCaretaker {
    //定义一个集合来存储多个备忘录
    private ArrayList mementoList = new ArrayList();

    public ChessmanMemento getMemento(int i) {
        return (ChessmanMemento)mementoList.get(i);
    }

    public void setMemento(ChessmanMemento memento) {
        mementoList.add(memento);
    }
}
